home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / Sample Editors⁄Viewers / Cappuccino / Source / CappuccinoEmbedding.cpp < prev    next >
Encoding:
Text File  |  1995-12-11  |  5.6 KB  |  222 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        CappuccinoEmbedding.cpp
  3.     
  4.     Contents:    Stub functions to be implemented for embedding support.
  5.     
  6.                 If you wish to add embedding support to a part, you must 
  7.                 implement the functions in this file.  If you do not wish 
  8.                 to support this feature, you can save a little space by removing 
  9.                 these functions and the similarly-named functions in the SOM 
  10.                 class.
  11.     
  12.     Written by:    Troy Gaul
  13.     
  14.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  15. */
  16.  
  17. // -- Compiler/Preprocessor Switches --
  18.  
  19. #ifndef _COMPILERDEFS_
  20. #include "CompDefs.h"
  21. #endif
  22.  
  23. // -- OpenDoc Utilities --
  24.  
  25. #ifndef _EXCEPT_
  26. // Exceptions define several important macros (eg. CHECKENV)
  27. // which are used in the SOM method dispatch glue. If Except.h
  28. // is not included early enough, exceptions may not be thrown
  29. // correctly when returning from a SOM method with the "ev" parameter set.
  30. #include <Except.h>
  31. #endif
  32.  
  33. // -- Cappuccino Includes --
  34.  
  35. #ifndef _CAPPUCCINO_
  36. #include "Cappuccino.h"
  37. #endif
  38.  
  39. #ifndef _CAPPUCCINODEF_
  40. #include "CappuccinoDef.h"
  41. #endif
  42.  
  43. #ifndef _CAPPUCCINOGLOBALS_
  44. #include "CappuccinoGlobals.h"
  45. #endif
  46.  
  47. // -- OpenDoc Includes --
  48.  
  49. #ifndef _ODTYPES_
  50. #include <ODTypes.h>
  51. #endif
  52.  
  53. // -- OpenDoc Utilities --
  54.  
  55. #ifndef _ODUTILS_
  56. #include <ODUtils.h>
  57. #endif
  58.  
  59. #ifndef _TEMPOBJ_
  60. #include <TempObj.h>
  61. #endif
  62.  
  63.  
  64. //------------------------------------------------------------------------------
  65. // Method:        RequestEmbeddedFrame
  66. // Origin:        ODPart
  67. //
  68. // Description:    This method is called ...
  69. //------------------------------------------------------------------------------
  70.  
  71. ODFrame* Cappuccino::RequestEmbeddedFrame( Environment*        ev,
  72.                                            ODFrame*            containingFrame,
  73.                                            ODFrame*            baseFrame,
  74.                                            ODShape*            frameShape,
  75.                                            ODPart*            embeddedPart,
  76.                                            ODTypeToken        viewType,
  77.                                            ODTypeToken        presentation,
  78.                                            ODBoolean        isOverlaid )
  79. {
  80.     SOM_Trace("Cappuccino","RequestEmbeddedFrame");
  81.  
  82.     THROW(kODErrCannotEmbed);
  83.  
  84.     return kODNULL;
  85. }
  86.  
  87. //------------------------------------------------------------------------------
  88. // Method:        RemoveEmbeddedFrame
  89. // Origin:        ODPart
  90. //
  91. // Description:    This method is called ...
  92. //------------------------------------------------------------------------------
  93.  
  94. void Cappuccino::RemoveEmbeddedFrame( Environment*        ev,
  95.                                       ODFrame*            embeddedFrame )
  96. {
  97.     SOM_Trace("Cappuccino","RemoveEmbeddedFrame");
  98.  
  99.     THROW(kODErrCannotEmbed);
  100. }
  101.  
  102. //------------------------------------------------------------------------------
  103. // Method:        RequestFrameShape
  104. // Origin:        ODPart
  105. //
  106. // Description:    This method is called ...
  107. //------------------------------------------------------------------------------
  108.  
  109. ODShape* Cappuccino::RequestFrameShape( Environment*    ev,
  110.                                         ODFrame*        embeddedFrame,
  111.                                         ODShape*        frameShape )
  112. {
  113.     SOM_Trace("Cappuccino","RequestFrameShape");
  114.  
  115.     THROW(kODErrCannotEmbed);
  116.  
  117.     return kODNULL;
  118. }
  119.  
  120. //------------------------------------------------------------------------------
  121. // Method:        UsedShapeChanged
  122. // Origin:        ODPart
  123. //
  124. // Description:    This method is called ...
  125. //------------------------------------------------------------------------------
  126.  
  127. void Cappuccino::UsedShapeChanged( Environment*        ev,
  128.                                    ODFrame*            embeddedFrame )
  129. {
  130.     SOM_Trace("Cappuccino","UsedShapeChanged");
  131.  
  132.     THROW(kODErrCannotEmbed);
  133. }
  134.  
  135. //------------------------------------------------------------------------------
  136. // Method:        AdjustBorderShape
  137. // Origin:        ODPart
  138. //
  139. // Description:    This method is called ...
  140. //------------------------------------------------------------------------------
  141.  
  142. ODShape* Cappuccino::AdjustBorderShape( Environment*    ev,
  143.                                         ODFacet*        embeddedFacet,
  144.                                         ODShape*        shape )
  145. {
  146.     SOM_Trace("Cappuccino","AdjustBorderShape");
  147.  
  148.     THROW(kODErrCannotEmbed);
  149.  
  150.     return kODNULL;
  151. }
  152.  
  153. //------------------------------------------------------------------------------
  154. // Method:        AcquireContainingPartProperties
  155. // Origin:        ODPart
  156. //
  157. // Description:    This method is called ...
  158. //------------------------------------------------------------------------------
  159.  
  160. ODStorageUnit* Cappuccino::AcquireContainingPartProperties( Environment*    ev,
  161.                                                             ODFrame*        frame )
  162. {
  163.     SOM_Trace("Cappuccino","GetContainingPartProperties");
  164.  
  165.     THROW(kODErrCannotEmbed);
  166.  
  167.     return kODNULL;
  168. }
  169.  
  170. //------------------------------------------------------------------------------
  171. // Method:        RevealFrame
  172. // Origin:        ODPart
  173. //
  174. // Description:    This method is called ...
  175. //------------------------------------------------------------------------------
  176.  
  177. ODBoolean Cappuccino::RevealFrame( Environment*        ev,
  178.                                    ODFrame*            embeddedFrame,
  179.                                    ODShape*            revealShape )
  180. {
  181.     SOM_Trace("Cappuccino","RevealFrame");
  182.  
  183.     THROW(kODErrCannotEmbed);
  184.  
  185.     return kODFalse;
  186. }
  187.  
  188. //------------------------------------------------------------------------------
  189. // Method:        EmbeddedFrameSpec
  190. // Origin:        ODPart
  191. //
  192. // Description:    This method is called ...
  193. //------------------------------------------------------------------------------
  194.  
  195. void Cappuccino::EmbeddedFrameSpec( Environment*    ev,
  196.                                     ODFrame*        embeddedFrame,
  197.                                     ODObjectSpec*    spec )
  198. {
  199.     SOM_Trace("Cappuccino","EmbeddedFrameSpec");
  200.  
  201.     THROW(kODErrCannotEmbed);
  202. }
  203.  
  204. //------------------------------------------------------------------------------
  205. // Method:        CreateEmbeddedFramesIterator
  206. // Origin:        ODPart
  207. //
  208. // Description:    This method is called ...
  209. //------------------------------------------------------------------------------
  210.  
  211. ODEmbeddedFramesIterator* Cappuccino::CreateEmbeddedFramesIterator( Environment*    ev,
  212.                                                                     ODFrame*        frame )
  213. {
  214.     SOM_Trace("Cappuccino","CreateEmbeddedFramesIterator");
  215.  
  216.     THROW(kODErrCannotEmbed);
  217.  
  218.     return kODNULL;
  219. }
  220.  
  221.  
  222.